package com.wangshouyu.mp.pay.v3.transactions;

import com.wangshouyu.mp.pay.v3.common.request.BaseV3PayRequest;

import java.util.Objects;

/**
 * @author 王守钰
 * @description 交易传输对象
 * @date 2020/8/14 下午11:28
 */
public class TransactionsQueryRequest extends BaseV3PayRequest {

    /**
     * 交易订单id
     */
    private String transactionId;

    /**
     * 商户订单号
     */
    private String outTradeNo;

    public String getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(String transactionId) {
        this.transactionId = transactionId;
    }

    public String getOutTradeNo() {
        return outTradeNo;
    }

    public void setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        if (!super.equals(o)) {
            return false;
        }
        TransactionsQueryRequest that = (TransactionsQueryRequest) o;
        return Objects.equals(transactionId, that.transactionId) &&
                Objects.equals(outTradeNo, that.outTradeNo);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), transactionId, outTradeNo);
    }

    @Override
    public String toString() {
        return "TransactionsQueryRequest{" +
                "transactionId='" + transactionId + '\'' +
                ", outTradeNo='" + outTradeNo + '\'' +
                '}';
    }
}
